package com.xiaobange.controller.system;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.xiaobange.entity.MedicalRecord;
import com.xiaobange.service.MedicalRecordService;
import com.xiaobange.vo.ResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @version 1.0
 * @Author 小班哥
 * @Date 2025/5/13 19:33
 * @Explain 接诊记录
 */
@RestController
@RequestMapping("/sys/medical")
public class MedicalRecordController {

    @Autowired
    private MedicalRecordService medicalRecordService;

    /**
     * 添加接诊记录
     * @param medicalRecord 接诊数据
     * @return successMessage
     */
    @SaCheckPermission(value = "system:medical:add",orRole = {"doctor","admin"})
    @PostMapping("/add")
    public ResultResponse<?> addMedical(@RequestBody MedicalRecord medicalRecord){
        return medicalRecordService.addMedical(medicalRecord);
    }

    @PostMapping("/page")
    public ResultResponse<List<MedicalRecord>> queryPage(){
        return null;
    }
}
